﻿<%@ Page Title="التصنيفات" Language="C#" MasterPageFile="~/MainMaster.master" AutoEventWireup="true" CodeFile="Classification.aspx.cs" Inherits="Classification" meta:resourcekey="PageResource1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

 <link href="jqModal.css" rel="stylesheet" type="text/css" />

  <%--  <script src="jquery-1.3.2.min.js" type="text/javascript"></script>--%>
    <script src="jqModal.js" type="text/javascript"></script>
   
    <script type="text/javascript">
  

    function there() {

        $("#dialog").jqm({ modal: true }).jqmShow();


    }
   
    </script>
      <style type="text/css">
          .newzr3{
	background:  url('images/Untitled-2_03.png') right ;

	height:34px;
	 background-repeat:no-repeat;
	 float:left;
	 margin-top:-5px;
	 text-align: center;
	 padding-right:15px;
	 cursor:pointer;
	 font-family:Tahoma;
	 font-size:14px;
	 color:#003353;
	 text-decoration:none;
	 
}
.newzr3:hover{
	color: #00b4ff;
	background-image:url('images/Untitled-2ho_03.png');
	background-repeat:no-repeat;

}
      .zr3 {
	background-image:url('images/button2.png');
	display:block;
	float:right;
	 padding: 0px 10px 0px 10px;
	height:21px;
	text-align:center;
	color:#fff;
	text-shadow:1px 1px 0px #003a5e;
	margin-right:2px;
	line-height:19px;
	font-weight:bold;
	text-decoration:none;
	font-family:Tahoma;
	font-size:12px;


}
.zr3:hover ,.zr3:active {
	background-image:url('images/button2.png');
	text-shadow:1px 1px 0px #003a5e;
	background-position:0px -21px;
	
}
  .stylelabel3
       {
       	color:#064c66;
	 font-weight:bold;
	 direction:rtl;
	 text-align:right;
       	}
             .tab3{
	width:815px;
 direction:rtl;
 border:1px #ccc solid;
 border-radius:5px;
 }

tr .tabbone3{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:center;
	
}
 .req3
       {
           color:Red;
       } 
.adel3{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  center;
}
.he3{
	background-color:#fff;
	padding:5px;
	font-family:Tahoma;
	font-size:14px;
	font-weight:bold;
}
        
        .jqmWindow {
    display: none;
    
    position: fixed;
    top: 30%;
    left: 50%;
    
    margin-left: -300px;
    width: 400px;
    
    background-color: #fff;
    color: #333;
    border: 1px solid black;
    padding: 12px;
}
.txt3
{
    border:1px solid black;
    margin-bottom:5px;
    margin-top:5px;
    }
.jqmOverlay { background-color: #000; }

/* Fixed posistioning emulation for IE6
     Star selector used to hide definition from browsers other than IE6
     For valid CSS, use a conditional include instead */
* html .jqmWindow 
{
     position: absolute;
     top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px');
}
            </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="addedit" runat="server" style="margin-top:20px;width:820px ; position:static" align="left" > 

<table width="100%">
<tr>
<td style ="padding:5px">
    <asp:LinkButton style="float:left" CssClass="newzr3" ID="newsub" runat="server"  Text="تصنيف  جديد"  
        meta:resourceKey="newsub" Height="19"  onclick="newsub_Click" ></asp:LinkButton>

</td>
</tr>
</table>
   
</div>

<div class="jqmWindow" id="dialog">

<a href="#" class="jqmClose" style="background-image:url('images/close.png');
	 width:39px;
	 height:40px;
	  background-repeat:no-repeat;
	  display:block;
	  float:left;	"></a>

     <table  dir="rtl">
        <tr>
            <td style="width:150px;" align="right">
                <asp:Label ID="lblpaidfees" runat="server" class="stylelabel3" 
                    meta:resourceKey="lblpaidfees" Text="التصنيف الموضوعى" />
            </td>
            <td>
                <asp:TextBox ID="paidfees" CssClass="txt3" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <asp:Button ID="save" runat="server" CssClass="zr3" meta:resourceKey="lblsave" 
                    onclick="save_Click" Text="حفظ" />
            </td>
        </tr>
    </table>
</div>
     






    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="select classifications.id,classifications.classification  , count(products.classification_id) as ps from classifications left join products on classifications.id=products.classification_id group by classifications.id,classifications.classification">
    </asp:SqlDataSource>
    
    <asp:GridView ID="GridView1" runat="server" 
        DataSourceID="SqlDataSource1" 
        AutoGenerateColumns="False" DataKeyNames="id" 
         Font-Size="Large" GridLines="None">
        <Columns>
        
        
                <asp:TemplateField>
                            <HeaderTemplate>
                            <div >
                                <table class="tab3" >
                                    <tr>
                                    <td class ="tabbone3" style="width:500px">
                                        <asp:Label ID="lblpaidfees" runat="server" Text="التصنيف الموضوعى" meta:resourceKey="lblpaidfees" />
                                        </td>
                                    <td class ="tabbone3"style ="width:100px">
                                     <asp:Label  ID="lblstops" runat="server" Text="تعديل" meta:resourceKey="lbledit" />
                                            
                                        </td>    
                                        </td>
                                    <td class ="tabbone3" style ="width:100px">
                                     <asp:Label ID="lblendofsubs" runat="server" Text="حذف" meta:resourceKey="lbldel" />
                                            
                                        
                                  
                                     
                                     <%--<td width="20%">
                                     <asp:Label ID="lblstartofsubs" runat="server" Text="الخصائص" meta:resourceKey="lblstartofsubs" />
                                            
                                        </td>--%>
                                        
                                      
                                    </tr>
                                </table>
                                </div>
                            </HeaderTemplate>
                            <ItemTemplate>
                              
                             
                                    <table class="tab3">
                                        <tr>
                                        <td class ="adel3" style="width:500px">
                                                <asp:Label  ID="paidfees" runat="server" ToolTip='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("ps"))) %>'  Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("classification"))) %>' />
                                            </td>

                                        <td class ="adel3" style="width:100px">
                                             <asp:LinkButton runat="server" ID="edits" Text='تعديل' meta:resourceKey="lbledit"  ToolTip='<%# Eval("id") %>' OnClick="edit_Click" Enabled="true" />
                                            
                                            </td>
                                       
                                            <td class ="adel3"style="width:100px">
                                               <asp:LinkButton runat="server" ID="delete" Text='حذف' meta:resourceKey="lbldel"  ToolTip='<%# Eval("id") %>' OnClick="delete_Click" Enabled="true" />
                                            </td>
                                           <%-- <td width="20%">
                                                <asp:Label Font-Bold="true" ID="startofsub" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("tag"))) %>' />
                                            </td>--%>
                                           
                                        </tr>
                                    </table>
                                      <asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" 
                        TargetControlID="delete" 
                        ConfirmText=".هل انت متأكد من  مسح االنوع؟؟؟" 
                          />
                                    </ItemTemplate>
                </asp:TemplateField>
      
        </Columns>
    </asp:GridView>
  
</asp:Content>
